#include "PhysicsUtils.h"

using namespace cmn;

Vec2 ToVec2( const b2Vec2& vec ) {
	return Vec2( vec.x, vec.y );
}

b2Vec2 ToB2Vec2( const Vec2& vec ) {
	return b2Vec2( vec.X, vec.Y );
}

Transform ToTransform( const b2Transform& transform ) {
	return Transform( ToVec2( transform.p ), -transform.q.GetAngle() );
}

b2Transform ToB2Transform( const Transform& transform ) {
	b2Transform result;
	result.Set( ToB2Vec2( transform.Vec ), -transform.Rot );
	return result;
}
